home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
bbs
/
fax_it_cnet.lzh
/
FAX-IT
/
fax-stat
< prev
next >
Wrap
Text File
|
1994-09-10
|
1KB
|
49 lines
/*
** This program displays any FAX STATUS messages that are in the
** user's mail directory. The STATUS messages will delete any FAX messages
** that failed and are not wanted, or place them back in the stack to
** be retried.
*/
Options Results
ChangeWhere 'FAX-IT!'
ChangeWhat 'Checking Status'
GetUser 1307954 ; UserDir = Result
OutDir = 'Doors:Fax-IT/Text/'
GetUser 40 ; UserNum = Result
TextFile = UserDir'FaxStatus'
DoFile = UserDir'FaxClean'
if Exists(TextFile) then do
file1=open(infile,TextFile,read)
if file1=1 then do
file2=open(outfile,DoFile,write)
if file2=1 then do
do while ~eof(infile)
text=readln(infile)
if text='--FAILED--' then call FailedFAX
else Print text
end
WriteLN(outfile,'delete 'TextFile)
WriteLN(outfile,'delete 'DoFile)
close(outfile)
end
close(infile)
end
Print 'c7FAX Status information deleted.....n2'
more
address Command 'c:Execute "'DoFile'"'
end
Exit
FailedFAX:
FileName=ReadLN(infile)
Query 'q1Would you like to try this FAX again? (y/c1Nq1) '
if Result='y' then WriteLN(outfile,'Move 'FileName' From 'UserDir' to 'OutDir)
else WriteLN(outfile,'Delete 'UserDir||FileName)
return